package by.amakarevich.dataaccess;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import by.amakarevich.datamodel.Product;
import by.amakarevich.datamodel.ShoppingCart;
import by.amakarevich.datamodel.ShoppingCartInfo;

public interface ShoppingCartInfoDao extends AbstractDao<Long, ShoppingCartInfo> {
	List<ShoppingCartInfo> getAllShoppingCartInfo();

    List<ShoppingCartInfo> getAllShoppingCartInfoByShoppingCart(SingularAttribute<ShoppingCartInfo, ?> attr, boolean ascending, int startRecord, int pageSize);
    
    void deleteShoppingCartInfo(Long id);
    
    ShoppingCartInfo getShoppingCartInfo(ShoppingCart shoppingCart, Product product);
    
    List<ShoppingCartInfo> getAllByShoppingCart(ShoppingCart shoppingCart);
    
    ShoppingCartInfo getByShoppingCartId(Long shoppingCartInfoId);
}
